import requestProxy from '@/utils/request';

const { request } = requestProxy;

// 飞来询价tab列表
export function tabList(params) {
  return request({
    url: '/admin/queryPrice/tab',
    method: 'get',
    params
  });
}
// 飞来询价列表
export function queryPriceList(params, cancelToken) {
  return request({
    url: '/admin/queryPrice/list',
    method: 'get',
    params,
    cancelToken
  });
}
// 飞来询价详情通知tab列表
export function adviseTabList(params) {
  return request({
    url: '/admin/queryPriceItem/tab',
    method: 'get',
    params
  });
}
// 飞来询价详情通知列表
export function adviseList(params, cancelToken) {
  return request({
    url: '/admin/queryPriceItem/list',
    method: 'get',
    params,
    cancelToken
  });
}
// 新建飞来询价
export function queryPriceCreate(data) {
  return request({
    url: '/admin/queryPrice/create',
    method: 'post',
    data
  });
}
// 飞来询价询价字段
export function getFieldList(params) {
  return request({
    url: '/admin/queryPrice/fieldList',
    method: 'get',
    params
  });
}
// 删除飞来询价列表元素
export function deleteQueryPrice(id) {
  return request({
    url: `/admin/queryPrice/delete/${id}`,
    method: 'delete'
  });
}
// 获取飞来询价详情信息
export function queryPriceInfo(id, params) {
  return request({
    url: `admin/queryPrice/detail/${id}`,
    method: 'get',
    params
  });
}
// 完成或者撤回询价
export function editPriceStatus(data) {
  return request({
    url: 'admin/queryPrice/editStatus',
    method: 'post',
    data
  });
}
// 追加询价说明
export function additional(data) {
  return request({
    url: 'admin/queryPrice/additional',
    method: 'post',
    data
  });
}
// 追加账号
export function additionalAccount(data) {
  return request({
    url: 'admin/queryPrice/additionalAccount',
    method: 'post',
    data
  });
}
// 操作日志
export function logList(params) {
  return request({
    url: 'admin/queryPrice/logs',
    method: 'get',
    params
  });
}

// 操作日志备注修改
export function logRemarkEdit(data) {
  return request({
    url: 'admin/queryPrice/log/remarks',
    method: 'put',
    data
  });
}
// 审批通过或驳回修改账号询价
export function editAccountStatus(data) {
  return request({
    url: 'admin/queryPriceItem/editStatus',
    method: 'post',
    data
  });
}
// 账号询价同步
export function syncAccountPrice(data) {
  return request({
    url: 'admin/queryPriceItem/syncAccountPrice',
    method: 'post',
    data
  });
}
// 询价同步状态
export function querySyncStatus(params) {
  return request({
    url: 'admin/queryPriceItem/querySyncStatus',
    method: 'get',
    params
  });
}
// 修改报价平台主页链接
export function editPriceItemLink(data) {
  return request({
    url: 'admin/queryPriceItem/editLink',
    method: 'put',
    data
  });
}
// 催办
export function press(data) {
  return request({
    url: 'admin/queryPrice/press',
    method: 'post',
    data
  });
}
// 通知至签约经纪
export function notice(data) {
  return request({
    url: 'admin/queryPrice/notice',
    method: 'post',
    data
  });
}
